/*
 * CameraGUI.h
 *
 *  Created on: Mar 23, 2013
 *      Author: ohnozzy
 */

#ifndef CAMERAGUI_H_
#define CAMERAGUI_H_
#include <ompl/geometric/PathGeometric.h>
#include <fcl/math/transform.h>
#include <fcl/shape/geometric_shapes.h>
#include "flyingcamera/base/VehiclePath.h"
#include <vector>
namespace flyingcamera
{
   namespace gui{
        class  CameraGUI
        {
        public:
        	const flyingcamera::base::VehiclePath* path_converter;
        	ompl::geometric::PathGeometric path;
        	std::vector<fcl::Box> box;
        	std::vector<fcl::Transform3f> transform;
        	std::vector<fcl::Vec3f> color;
        	virtual ~CameraGUI(){};
        	CameraGUI(const ompl::geometric::PathGeometric& p, const flyingcamera::base::VehiclePath* pc, double d):  path_converter(pc), path(p), distance(d){
                  path.interpolate();

        	}
        	void addObstacle(const fcl::Box& b, const fcl::Transform3f& tf, const fcl::Vec3f& c){
        		transform.push_back(tf);
        		box.push_back(b);
        		color.push_back(c);
        	}
            std::size_t getObstacleCount() const{
            	return box.size();
            }
            void getObstacle(unsigned i, fcl::Box& b, fcl::Transform3f& tf, fcl::Vec3f& c) const {
                    b=box[i];
                    tf=transform[i];
                    c=color[i];
            }
            std::size_t getStateCount() const{
            	return path.getStateCount();
            }
            const ompl::base::State* getState(unsigned i) const{
                        	return path.getState(i);
            }
            virtual bool hasMovingObstacle() const {return false;}
            double getStateDelay(unsigned i) const;
        	double distance;







        };

   }
}


#endif /* CAMERAGUI_H_ */
